import React, { Component } from 'react';
import { DragSource } from 'react-dnd';


const cardSource = {
  beginDrag(props:any) {
    return {
      text: props.text
    };
  }
};

@DragSource('ItemTypes.CARD', cardSource, (connect, monitor) => ({
  connectDragSource: connect.dragSource(),
  isDragging: monitor.isDragging()
}))
export default class CCard extends Component<any, {}> {
  public render() { 
    return (
      <div>
        fdsfdsadsdsad11
      </div>
    )
    //    this.props.connectDragSource(
    //   <div style={{ opacity: this.props.isDragging ? 0.5 : 1 }}>
    //     {this.props.text}
    //   </div>
    // );
  }
}